/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bs.Beans;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Bone
 */
@Entity
@Table(name = "folha_ppp_cat")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "FolhaPppCat.findAll", query = "SELECT f FROM FolhaPppCat f")})
public class FolhaPppCat implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer id;
    @Column(name = "NUMERO_CAT")
    private Integer numeroCat;
    @Column(name = "DATA_AFASTAMENTO")
    @Temporal(TemporalType.DATE)
    private Date dataAfastamento;
    @Column(name = "DATA_REGISTRO")
    @Temporal(TemporalType.DATE)
    private Date dataRegistro;
    @JoinColumn(name = "ID_FOLHA_PPP", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private FolhaPpp idFolhaPpp;

    public FolhaPppCat() {
    }

    public FolhaPppCat(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getNumeroCat() {
        return numeroCat;
    }

    public void setNumeroCat(Integer numeroCat) {
        this.numeroCat = numeroCat;
    }

    public Date getDataAfastamento() {
        return dataAfastamento;
    }

    public void setDataAfastamento(Date dataAfastamento) {
        this.dataAfastamento = dataAfastamento;
    }

    public Date getDataRegistro() {
        return dataRegistro;
    }

    public void setDataRegistro(Date dataRegistro) {
        this.dataRegistro = dataRegistro;
    }

    public FolhaPpp getIdFolhaPpp() {
        return idFolhaPpp;
    }

    public void setIdFolhaPpp(FolhaPpp idFolhaPpp) {
        this.idFolhaPpp = idFolhaPpp;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FolhaPppCat)) {
            return false;
        }
        FolhaPppCat other = (FolhaPppCat) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bs.Beans.FolhaPppCat[ id=" + id + " ]";
    }
    
}
